const Router = require("koa-router");
const labelController = require("../controllers/labelController");
const router = new Router({
    prefix: '/api', // 👈 所有路由自动加 /api 前缀
});

// 添加图表类型标签
router.post('/label/add', labelController.addLabel);
// 获取图表类型标签
router.get('/label/list', labelController.getLabels);
// 删除图表类型标签
router.post('/label/delete', labelController.deleteLabel);

// 状态标签模块
router.post('/state/add', labelController.addStateLabel);
router.get('/state/list', labelController.getStateLabels);
router.post('/state/delete', labelController.deleteStateLabel);


// 根据图片path获取标签
router.post('/label/getByPath', labelController.getMultiLabelByImageName);
// 添加修改标签
router.post('/label/update', labelController.addMultiLabel);
// 删除图片上对应标签的数据
router.post('/label/deleteLabel', labelController.deleteMultiLabel);
// 获取已经打标签的列表
router.get('/getLabelList', labelController.getMultiLabelList);


module.exports = router;
